import config from "@/config"
import http from "@/utils/request"

export default {
	// department: {
	// 	list: {
	// 		url: `${config.API_URL}/company/department/lists`,
	// 		name: "部门列表",
	// 		get: async function (params = {}) {
	// 			return await http.get(this.url, params);
	// 		}
	// 	},
	// 	add: {
	// 		url: `${config.API_URL}/company/department/add`,
	// 		name: "新增部门",
	// 		post: async function (data = {}) {
	// 			return await http.post(this.url, data);
	// 		}
	// 	},
	// 	edit: {
	// 		url: `${config.API_URL}/company/department/edit`,
	// 		name: "编辑部门",
	// 		post: async function (data = {}) {
	// 			return await http.post(this.url, data);
	// 		},
	// 		get: async function (params = {}) {
	// 			return await http.get(this.url, params);
	// 		}
	// 	},
	// 	delete: {
	// 		url: `${config.API_URL}/company/department/delete`,
	// 		name: "删除部门",
	// 		post: async function (data = {}) {
	// 			return await http.post(this.url, data);
	// 		}
	// 	}
	// },
	position: {
		list: {
			url: `${config.API_URL}/company/position/lists`,
			name: "部门列表",
			get: async function (params = {}) {
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/company/position/add`,
			name: "新增职位",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/company/position/edit`,
			name: "编辑职位",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			},
			get: async function (params = {}) {
				return await http.get(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/company/position/delete`,
			name: "删除职位",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			}
		}
	},
	employee: {
		list: {
			url: `${config.API_URL}/company/employee/lists`,
			name: "员工列表",
			get: async function (params = {}) {
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/company/employee/add`,
			name: "新增员工",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/company/employee/edit`,
			name: "编辑员工",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			},
			get: async function (params = {}) {
				return await http.get(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/company/employee/delete`,
			name: "删除员工",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			}
		}
	},
	customer: {
		list: {
			url: `${config.API_URL}/company/customer/lists`,
			name: "客户列表",
			get: async function (params = {}) {
				return await http.get(this.url, params);
			}
		},
		add: {
			url: `${config.API_URL}/company/customer/add`,
			name: "新增客户",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/company/customer/edit`,
			name: "编辑客户",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			},
			get: async function (params = {}) {
				return await http.get(this.url, params);
			}
		},
		delete: {
			url: `${config.API_URL}/company/customer/delete`,
			name: "删除客户",
			post: async function (data = {}) {
				return await http.post(this.url, data);
			}
		}
	}
}
